package P1422;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Double consume = sc.nextDouble();
        if (consume<=150) consume *= 0.4463;
        else if (150 < consume && consume <= 400)consume =  66.945 + (consume - 150) * 0.4663;
        else consume = 183.52 + (consume - 400) * 0.5663;
        System.out.println((int)(consume*10+0.5)/10.0);
    }
}
